home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / Demos_Files / Code_Generation / Testing the compiled program with a file.nsm < prev    next >
Encoding:
Text File  |  2002-03-08  |  2.0 KB  |  55 lines

  1. subtitleTextBox. setText ("")
  2. mainTextBox. setText ("")
  3.  
  4. activeBreadboard. selectKind ( "TextBoxEngine", FALSE )
  5. activeBreadboard. unselect ( titleTextBox )
  6. activeBreadboard. unselect ( subtitleTextBox )
  7. activeBreadboard. unselect ( mainTextBox )
  8. activeBreadboard. deleteSelection (  )
  9.  
  10. WeightFilePath = macro. pathFromMacro ( "xorWeights.nsw" )
  11. control. loadWeights ( WeightFilePath , FALSE )
  12.  
  13. controlBackprop. freeALL (  )
  14. activeBreadboard. deleteObject ( "viewWeights" )
  15. activeBreadboard. deleteObject ( "saveWeights" )
  16. activeBreadboard. deleteObject ( "activeInputProbe" )
  17. activeBreadboard. deleteObject ( "activeOutputProbe" )
  18.  
  19. activeBreadboard. stampOnAndMove ( "DataWriter" , "outputAxon" )
  20. dataWriter. setName ( "activeOutputProbe" )
  21. activeOutputProbe. setActiveAccessPoint ( "Activity" )
  22. activeOutputProbe. setEnableLabels ( TRUE )
  23. activeOutputProbe. setLabel ( "Output" )
  24.  
  25. activeOutputProbe. setFlashFileMode ( 2 )
  26. activeOutputProbe. tileWindow (3,5,4,4)
  27.  
  28. activeBreadboard. lockWindowUpdate()
  29.  
  30. runNetwork. setName ( "runCompiledProgram" )
  31. runCompiledProgram. setText ( "Run compiled program" )
  32. ControlMacroPath = macro. pathFromMacro ( "runCompiledProgram.nsm" )
  33. runCompiledProgram. setMacroPath ( ControlMacroPath )
  34.  
  35. stepExemplar. setName ( "viewSourceCode" )
  36. viewSourceCode. setText ( "View source code" )
  37. ControlMacroPath = macro. pathFromMacro ( "viewSourceCode1.nsm" )
  38. viewSourceCode. setMacroPath ( ControlMacroPath )
  39.  
  40. activeBreadboard. unlockWindowUpdate()
  41.  
  42. SourcePath = macro. pathFromMacro ( "xorFileTesting.cpp" )
  43. control. setCodeGenProjectPath ( SourcePath )
  44.  
  45. activeBreadboard. select ( NULL , FALSE )
  46.  
  47. control. setLearning ( FALSE )
  48. control. stepEpoch (  )
  49. control. stepEpoch (  )
  50.  
  51. NextMacroPath = macro. pathFromMacro ( "Testing the compiled program from the console.nsm" )
  52. nextButton. setMacroPath ( NextMacroPath )
  53. SubtitleIndex = subtitleTextBox. setTextFromFile (TextBoxPath, SubtitleIndex)
  54. MainIndex = mainTextBox. setTextFromFile (TextBoxPath, MainIndex)
  55.